<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员登录 - ${site.name} - Powered by JEECMS</title>
<link href="${resSys}/front.css" rel="stylesheet" type="text/css"/>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/${res}/css/regist.css" />
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
</script>
</head>

<body>
<div class="container">
<div class="toolbar box">
   <div class="toolbar-inner">
    <div class="fl " id="logincontent">
	[#if user??]欢迎您: ${user.username} &nbsp; ${user.group.name} &nbsp; <a href="logout.jspx?returnUrl=/">退出登录</a>[#else]
	游客您好，您还没有登录哦！ <a href="${base}/register.jspx">免费注册</a>|<a href="${base}/login.jspx?returnUrl=${base}/">登录</a>[/#if]
	</div>
    <div class="fr">
	<a href="${base}/tag.jspx" target="_blank">Tags</a>|<a href="${base}/search.jspx" target="_blank">高级搜索</a>|<a href="${base}/rss.jspx" target="_blank">RSS订阅</a>|<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.jeecms.com');">设为主页</a>|
	<a onclick="javascript:window.external.AddFavorite('index.html', '${site.name}');" href="javascript:void(0)" class="login_user">加入收藏</a>
	</div>
  </div>
</div>
<div class="main">  
	<div class="header box">
        <div class="brand">
            <h1><a href="${base}/"> ${site.name}</a></h1>
        </div>
    </div>
<form id="jvForm" action="${base}/login.jspx" method="post">
      <table width="800" border="0" align="center" cellpadding="0" cellspacing="5">		  
			<tr>
				<td height="30" align="left">				
				[#if message??]
				<div style="color:red">
				[#if message=="true"]
				您必须登录后才能继续刚才的操作
				[#else]
				${message}
				[/#if]
				</div>
				<input type="hidden" name="message" value="${message}"/>
				[/#if]				
				[#if processUrl??]<input type="hidden" name="processUrl" value="${processUrl}"/>[/#if]
				[#if returnUrl??]<input type="hidden" name="returnUrl" value="${returnUrl}"/>[#else]<input type="hidden" name="returnUrl" value="/"/>[/#if]
				[#if error??]
					<ul>
						[#if error=="org.apache.shiro.authc.IncorrectCredentialsException"]
						<li>[@s.m "error.invalidPassword"/]</li>
						[#elseif error=="org.apache.shiro.authc.UnknownAccountException"]
						<li>[@s.m "error.usernameNotExist"/]</li>
						[#elseif error=="com.jeecms.common.security.CaptchaErrorException"]
						<li>[@s.m "error.invalidCaptcha"/]</li>
						[#elseif error=="com.jeecms.common.security.DisabledException"]
						<li>[@s.m "error.userDisabled"/]</li>
 						[/#if]
					</ul>
				[/#if]
				[#if success??]
				[#if success]
					注册成功！
				[/#if]
				[/#if]
				</td>
			</tr>
		</table>
		<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="300" height="300" align="left"><img src="/${res}/img/member/llogo.gif" /></td>
            <td>
            <div class="login-bg">
            <table width="50%" border="0" align="left" cellpadding="0" cellspacing="5">	
                 <tr>
                   <td height="40" colspan="3" align="center"><strong style="font-size:14px;">会员登录</strong></td>
                 </tr>	  
                 <tr>
	                 <td width="67" height="30" align="right">用户名：</td>
	                 <td colspan="2"><input type="text" id="username" name="username" class="input required"/></td>
                  </tr>
                 <tr>
                   <td height="30" align="right">密　码：</td>
                   <td colspan="2"><input type="password" id="password" name="password" class="input required"/></td>
                 </tr>
                 <tr>
                   <td height="30" align="right">验证码：</td>
                   <td ><input type="text" id="captcha" name="captcha" class="input required"/></td>
                 </tr>	
                  <tr>
                     <td height="30" align="right">&nbsp;</td>
                     <td colspan="2"><img src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()*1" width="100" height="35"/></td>
                 </tr>	
                  <tr>
                     <td height="40" colspan="3" align="center"><input type="submit" value=" 登 录 " class="login-button"/>&nbsp;&nbsp;&nbsp;<a href="${base}/member/forgot_password.jspx" target="_blank" class="forgot-password">忘记密码？</a></td>
                  </tr>
                  <tr>
                     <td height="50" colspan="3" align="center" style="font-size:12px; color:#404040;">我还没有JEECMS帐号？<a href="${base}/register.jspx" target="_blank" style="color:#1647a6;">马上注册</a></td>
                  </tr>
              </table>
              
			<table width="30%" border="0" align="left" cellpadding="0" cellspacing="5">	
				<tr>
					<td></td>
                    <td height="40" align="center"><strong style="font-size:14px;">一键登录</strong></td>
                  </tr>	
                  [#if site.config.qqEnable]
                  <tr>
                    <td height="30" align="right"></td>
                    <td >
                    <script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid="${site.config.qqID!}" data-redirecturi="http://${site.domain}/public_auth.jspx" charset="utf-8"></script>
					<span id="qqLoginBtn"></span>
					<script type="text/javascript">
						//插入按钮的节点qqLoginBtn id
					    QC.Login({btnId:"qqLoginBtn",size: "A_M"}, function(reqData, opts){//登录成功
					       //根据返回数据，更换按钮显示状态方法
					       var dom = document.getElementById(opts['btnId']),
					       _logoutTemplate=[
					            //头像
					         //   '<span><img src="{figureurl}" class="{size_key}"/></span>',
					            //昵称
					            '<span>{nickname}</span>',
					            //退出
					            '<span><a href="javascript:QC.Login.signOut();">退出</a></span>'    
					       ].join("");
					       dom && (dom.innerHTML = QC.String.format(_logoutTemplate, {
					           nickname : QC.String.escHTML(reqData.nickname), //做xss过滤
					           figureurl : reqData.figureurl
					       }));
					   });
					 </script>
                    </td>
                  </tr>	
				[/#if]
				[#if site.config.sinaEnable]
                  <tr>
                    <td height="30" align="right"></td>
                    <td >
                    	<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=${site.config.sinaID!}" type="text/javascript" charset="utf-8"></script>
                    	<!--start sina账号登录平台--> 
						<img src="${resSys}/sinalogin.gif" alt="新浪微博登陆" id="wb_connect_btn" style="cursor: pointer;"/> 
						<script type="text/javascript">
						 WB2.anyWhere(function(W){
						 W.widget.connectButton({
						  id: "wb_connect_btn",
						  type: '3,2',
						  callback : {
						   login:function(o){
						    //登录成功之后执行
						    location="${base}/public_auth.jspx";
						   },
						   logout:function(){
						    //退出之后执行退出本地用户
      						location="${base}/logout.jspx?returnUrl=/";
						   }
						  }
						 });
						});
						</script>
						<!-- end sina账号登陆平台 -->
                    </td>
                  </tr>	
				[/#if]
				[#if site.config.qqWeboEnable]
                  <tr>
                    <td height="30" align="right"></td>
                    <td >
                    	<script type="text/javascript" src="http://mat1.gtimg.com/app/openjs/openjs.js"></script>
                    	<!--start 腾讯微博账号登录平台--> 
                    	<img src="${resSys}/qqwebo.gif" alt="腾讯微博登陆" id="qqwebo_login_btn" style="cursor: pointer;"/>
                    	<script type="text/javascript">
                    		T.init({
                    		    appkey: ${site.config.qqWeboID!}, 
                    		    autoclose:false,
                    		    callbackurl:"http://${site.domain}/public_auth.jspx"
                    		});
                    		 function logout(){
                                 T.logout(function (loginStatus) { // 登出用户
			    					// 登录成功
								});
                			}
                    		$(function() {
                        		$("#qqwebo_login_btn").click(function(){
                        			T.login(function (loginStatus) { // 弹出登录窗口
       							     // 本次登录成功
       							       $.cookie("qqWeboId",loginStatus.openid);
       							 	},function (error) {
       							 	});
                            	});
                    		});
						</script>
						<!-- end 腾讯微博登陆平台 -->
                    </td>
                  </tr>	
				[/#if]
              </table>
			 </div>
			</td>
          </tr>
    </table>
	
</form>	
</div>

[#include "member_footer.html"/]
</div>
</body>
</html>